/**
 * Copyright (c) 2016 Lenovo Group
 * All Rights Reserved.
 * 
 * Project Name:app-gateway
 * Create Time: 2016年1月19日 下午1:44:15
 */
package com.lenovo.lmrp.server.appgateway;

import java.io.Serializable;
import java.util.Date;

import com.lenovo.lmrp.api.model.view.LoginData;

/**
 * @author zhangzhenga
 *
 */
public class AppSession implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -846681727876422367L;
    private LoginData loginData;
    private String refreshToken;
    private String token;
    private Date expireTime;

    public boolean tokenExpired() {
        final long time = expireTime.getTime();
        return time < new Date().getTime();
    }

    public LoginData getLoginData() {
        return loginData;
    }

    public void setLoginData(LoginData loginData) {
        this.loginData = loginData;
    }

    public Date getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(Date expireTime) {
        this.expireTime = expireTime;
    }

    public String getRefreshToken() {
        return refreshToken;
    }

    public void setRefreshToken(String refreshToken) {
        this.refreshToken = refreshToken;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }
}
